import service from '@/utils/request'

// @Tags Sys_department
// @Summary 创建部门
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Sys_department true "创建部门"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /department/createSys_department [post]
export const createSys_department = (data) => {
  return service({
    url: '/department/createSys_department',
    method: 'post',
    data
  })
}

// @Tags Sys_department
// @Summary 删除部门
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Sys_department true "删除部门"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /department/deleteSys_department [delete]
export const deleteSys_department = (params) => {
  return service({
    url: '/department/deleteSys_department',
    method: 'delete',
    params
  })
}

// @Tags Sys_department
// @Summary 批量删除部门
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除部门"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /department/deleteSys_department [delete]
export const deleteSys_departmentByIds = (params) => {
  return service({
    url: '/department/deleteSys_departmentByIds',
    method: 'delete',
    params
  })
}

// @Tags Sys_department
// @Summary 更新部门
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Sys_department true "更新部门"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /department/updateSys_department [put]
export const updateSys_department = (data) => {
  return service({
    url: '/department/updateSys_department',
    method: 'put',
    data
  })
}

// @Tags Sys_department
// @Summary 用id查询部门
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Sys_department true "用id查询部门"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /department/findSys_department [get]
export const findSys_department = (params) => {
  return service({
    url: '/department/findSys_department',
    method: 'get',
    params
  })
}

// @Tags Sys_department
// @Summary 分页获取部门列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取部门列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /department/getSys_departmentList [get]
export const getSys_departmentList = (params) => {
  return service({
    url: '/department/getSys_departmentList',
    method: 'get',
    params
  })
}
